package com.code2roc.jarmanage.firewall;

import com.code2roc.jarmanage.depoly.DepolyPlatform;
import com.code2roc.jarmanage.util.EnviromentUtil;

public class FireWallServiceFactory {

    public FireWallService CreateFireWallService() {
        FireWallService fireWallService = null;
        String platform = EnviromentUtil.getDepolyPlaform();
        if(platform.equals(DepolyPlatform.Windows)){
            fireWallService = new WindowsFireWallService();
        }else {
            if(platform.equals(DepolyPlatform.LinuxUbuntu) || platform.equals(DepolyPlatform.LinuxDebian)){
                fireWallService = new LinuxUFWService();
            }else{
                fireWallService = new LinuxFireWallService();
            }
        }
        return fireWallService;
    }
}
